]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panel: Fix drawing functions for light theme
authorSam Hewitt <sam@snwh.org>
Wed, 5 Jul 2023 15:00:14 +0000 (12:30 -0230)
committerMarge Bot <marge-bot@gnome.org>
Wed, 2 Aug 2023 20:05:39 +0000 (20:05 +0000)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2823>

data/theme/gnome-shell-sass/_drawing.scss
data/theme/gnome-shell-sass/widgets/_panel.scss
js/ui/panel.js

index 87d987867893eee09898263ea1d4d3e1dd2e416d..2551d68ae66e313c29a93e305a2a2810ca5e467f 100644 (file)
 // $flat:               if true, the button is filled instead of transparent
 // $highlighted_child:  if true, applies some special overrides for to a
 //                      child element, see _panel.scss for details
+// $child_class:        class name of the child element
 //
 
 @mixin panel_button($bg:$panel_fg_color, $fg:$panel_fg_color, $flat: true, $highlighted_child: false, $child_class:"") {
   @if $flat {
     box-shadow: none;
 
-    &:active, &:overview, &:focus, &:checked {
-      box-shadow: inset 0 0 0 100px transparentize($bg, 0.75);
+    &:active, &:focus, &:checked {
+      box-shadow: inset 0 0 0 100px transparentize($fg, 0.75);
       &:hover {
-        box-shadow: inset 0 0 0 100px transparentize($bg, 0.65);
+        box-shadow: inset 0 0 0 100px transparentize($fg, 0.65);
       }
     }
 
     &:hover {
-      box-shadow: inset 0 0 0 100px transparentize($bg, 0.8);
+      box-shadow: inset 0 0 0 100px transparentize($fg, 0.8);
     }
 
   } @else {
     box-shadow: inset 0 0 0 100px transparentize($bg, 0.2);
 
-    &:active, &:overview, &:focus, &:checked {
+    &:active, &:focus, &:checked {
       box-shadow: inset 0 0 0 100px $bg;
       &:hover {
         box-shadow: inset 0 0 0 100px transparentize($bg, 0.05);
       border-radius: 99px;
     }
 
-    &:active, &:overview, &:focus, &:checked {
+    &:active, &:focus, &:checked {
       box-shadow: none !important;
 
       #{$child_class} {
-        box-shadow: inset 0 0 0 100px transparentize($bg, 0.75);
-      }
+        box-shadow: inset 0 0 0 100px transparentize($fg, 0.75);
 
-      &:hover {
-        box-shadow: none !important;
-        #{$child_class} {
-          box-shadow: inset 0 0 0 100px transparentize($bg, 0.65);
+        &:hover {
+          box-shadow: inset 0 0 0 100px transparentize($fg, 0.65) !important;
         }
       }
     }
     &:hover {
       box-shadow: none !important;
       #{$child_class} {
-        box-shadow: inset 0 0 0 100px transparentize($bg, 0.8);
+        box-shadow: inset 0 0 0 100px transparentize($fg, 0.8);
       }
     }
   }
index b8b2a9e3aae5ae5cd7cdcc6812bf52d55c65145d..d58bc658282bcf9d10176ef98d6daffb68f59c2b 100644 (file)
@@ -19,18 +19,6 @@ $panel_transition_duration: 250ms; // same as the overview transition duration
   transition-duration: $panel_transition_duration;
   box-shadow: inset 0 -1px 0 0  $panel_border_color;
 
-  // transparent panel on lock & login screens
-  &.unlock-screen,
-  &.login-screen,
-  &:overview {
-    background-color: transparent;
-    box-shadow: none;
-
-    .panel-button {
-      @include panel_button($panel_system_fg_color);
-    }
-  }
-
   // panel menus
   .panel-button {
     @include panel_button($panel_fg_color);
@@ -92,6 +80,23 @@ $panel_transition_duration: 250ms; // same as the overview transition duration
     }
   }
 
+  // transparent panel on lock & login screens
+  &.unlock-screen,
+  &.login-screen,
+  &:overview {
+    background-color: transparent;
+    box-shadow: none;
+
+    .panel-button {
+      @include panel_button($panel_system_fg_color, $fg:$panel_system_fg_color);
+
+      // clock
+      &.clock-display {
+        @include panel_button($panel_system_fg_color, $fg:$panel_system_fg_color, $highlighted_child: true, $child_class:".clock");
+      }
+    }
+  }
+
   .panel-status-indicators-box,
   .panel-status-menu-box {
     spacing: 2px;
index 3a99c9e52764b9364e59c6ad57f350177b9987ec..49b18926ef8f201583444e45f47e615fe46ca025 100644 (file)
@@ -276,11 +276,11 @@ class ActivitiesButton extends PanelMenu.Button {
         this.label_actor = this._label;
 
         Main.overview.connect('showing', () => {
-            this.add_style_pseudo_class('overview');
+            this.add_style_pseudo_class('checked');
             this.add_accessible_state(Atk.StateType.CHECKED);
         });
         Main.overview.connect('hiding', () => {
-            this.remove_style_pseudo_class('overview');
+            this.remove_style_pseudo_class('checked');
             this.remove_accessible_state(Atk.StateType.CHECKED);
         });